﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CSEPT
{
    public class Log
    {
        static public void Error(string message, string location)
        {
            Error(message, location, false);
        }
        static public void Error(string message, string location,bool sendEmail)
        {
            CreateLog(message, location, "Error", sendEmail);
            throw new Exception(message);
        }
        static public void Info(string message, string location)
        {
            Info(message, location, false);
        }
        static public void Info(string message, string location, bool sendEmail)
        {
            CreateLog(message, location, "Info", sendEmail);
        }
        static public void Warning(string message, string location)
        {
            Warning(message, location, false);
        }
        static public void Warning(string message, string location, bool sendEmail)
        {
            CreateLog(message, location, "Warning", sendEmail);
            throw new Exception(message);
        }
        static private void CreateLog(string message, string location, string Type, bool sendEmail){
            //PSHHHH logging who needs that, until you do....
            if(sendEmail)
            {
                //send an email you fool
            }
        }
    }
}
